added SSCLI 1.0
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSWPFNavigationUsage / MainPage.xaml.cs
blob746cf8aca50b271d3c751f576bfa67e1c3d0fa46
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Windows;
6 using System.Windows.Controls;
7 using System.Windows.Data;
8 using System.Windows.Documents;
9 using System.Windows.Input;
10 using System.Windows.Media;
11 using System.Windows.Media.Imaging;
12 using System.Windows.Shapes;
13 using System.Windows.Navigation;
15 namespace CSWPFNavigationUsage
17 public partial class MainPage : Page
19 public MainPage()
21 InitializeComponent();
24 private void OnHyperlink(object sender, RoutedEventArgs e)
26 this.NavigationService.Navigate(new Uri("Page1.xaml", UriKind.Relative));
29 private void OnNavagateToObject(object sender, RoutedEventArgs e)
31 MyDummy obj = new MyDummy() { Property1 = "Hello", Property2 = "everyone" };
32 this.NavigationService.Navigate(obj);
35 private void OnNavagateToPage(object sender, RoutedEventArgs e)
37 this.NavigationService.Navigate(new Uri("FramePage.xaml", UriKind.Relative));
41 public class MyDummy
43 public string Property1 { get; set; }
44 public string Property2 { get; set; }